package cn.gson.oasys.services.note.impl;

import cn.gson.oasys.model.dao.processdao.NotepaperDao;
import cn.gson.oasys.model.entity.process.Notepaper;
import cn.gson.oasys.services.note.NotePaperService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Transactional
public class NotePaperServiceImpl implements NotePaperService {

    @Autowired
    private NotepaperDao notepaperDao;

    //记日志
    Logger log = LoggerFactory.getLogger(getClass());

    //按创建时间降序获取便签
    @Override
    public List<Notepaper> findByUserIdOrderByCreateTimeDesc(Long userId) {
        return notepaperDao.findByUserIdOrderByCreateTimeDesc(userId);
    }
}
